<!DOCTYPE html>





<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 3.9.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=7.4.0">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png?v=7.4.0">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png?v=7.4.0">
  <link rel="mask-icon" href="/images/avatar.svg?v=7.4.0" color="#222">
  <link rel="alternate" href="/atom.xml" title="Anemone's Blog" type="application/atom+xml">
  <meta name="google-site-verification" content="Re5JdegRYzNFco-rC9lYIsvSWIgh5JvyfhuEaZCeFCk">
  <meta name="baidu-site-verification" content="opTC8YN3Pn">

<link rel="stylesheet" href="/css/main.css?v=7.4.0">


<link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">


<script id="hexo-configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '7.4.0',
    exturl: false,
    sidebar: {"position":"left","display":"post","offset":12,"onmobile":false},
    copycode: {"enable":false,"show_result":false,"style":null},
    back2top: {"enable":true,"sidebar":false,"scrollpercent":false},
    bookmark: {"enable":false,"color":"#222","save":"auto"},
    fancybox: false,
    mediumzoom: false,
    lazyload: false,
    pangu: false,
    algolia: {
      appID: 'GB90MXPJ1C',
      apiKey: '05d808da3baf50ac2f2fad2dc3a3cd8f',
      indexName: 'dev_blog',
      hits: {"per_page":20},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    },
    localsearch: {"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":true,"preload":false},
    path: 'search.xml',
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    translation: {
      copy_button: '复制',
      copy_success: '复制成功',
      copy_failure: '复制失败'
    },
    sidebarPadding: 40
  };
</script>

  <meta name="description" content="Clair简介clair是CoreOS公司开源的一套针对容器安全性检测工具，主要用于发掘容器中使用的组件是否存在安全性问题。GitHub项目地址： https://github.com/quay/clair Clair Framework术语 Ancestry——表示容器 Feature——容器中任何具有脆弱性的实体，如软件包和文件 Feature Namespace——Feature所在的上下文">
<meta name="keywords" content="容器安全,docker">
<meta property="og:type" content="article">
<meta property="og:title" content="Clair初探">
<meta property="og:url" content="http://anemone.top/container-Clair初探/index.html">
<meta property="og:site_name" content="Anemone&#39;s Blog">
<meta property="og:description" content="Clair简介clair是CoreOS公司开源的一套针对容器安全性检测工具，主要用于发掘容器中使用的组件是否存在安全性问题。GitHub项目地址： https://github.com/quay/clair Clair Framework术语 Ancestry——表示容器 Feature——容器中任何具有脆弱性的实体，如软件包和文件 Feature Namespace——Feature所在的上下文">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="http://anemone.top/container-Clair初探/image-20191117195355945.png">
<meta property="og:image" content="http://anemone.top/container-Clair初探/image-20191117172303850.png">
<meta property="og:image" content="http://anemone.top/container-Clair初探/image-20191124155822590.png">
<meta property="og:updated_time" content="2019-11-24T07:58:54.077Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Clair初探">
<meta name="twitter:description" content="Clair简介clair是CoreOS公司开源的一套针对容器安全性检测工具，主要用于发掘容器中使用的组件是否存在安全性问题。GitHub项目地址： https://github.com/quay/clair Clair Framework术语 Ancestry——表示容器 Feature——容器中任何具有脆弱性的实体，如软件包和文件 Feature Namespace——Feature所在的上下文">
<meta name="twitter:image" content="http://anemone.top/container-Clair初探/image-20191117195355945.png">
  <link rel="canonical" href="http://anemone.top/container-Clair初探/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome: false,
    isPost: true,
    isPage: false,
    isArchive: false
  };
</script>

  <title>Clair初探 | Anemone's Blog</title>
  








  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .logo,
  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">
  <div class="container use-motion">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-meta">

    <div>
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Anemone's Blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>


<nav class="site-nav">
  
  <ul id="menu" class="menu">
      
      
      
        
        <li class="menu-item menu-item-home">
      
    

    <a href="/" rel="section"><i class="fa fa-fw fa-home"></i>首页</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-about">
      
    

    <a href="/about/" rel="section"><i class="fa fa-fw fa-user"></i>关于</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-tags">
      
    

    <a href="/tags/" rel="section"><i class="fa fa-fw fa-tags"></i>标签</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-categories">
      
    

    <a href="/categories/" rel="section"><i class="fa fa-fw fa-th"></i>分类</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-archives">
      
    

    <a href="/archives/" rel="section"><i class="fa fa-fw fa-archive"></i>归档</a>

  </li>
      <li class="menu-item menu-item-search">
        <a href="javascript:;" class="popup-trigger">
        
          <i class="fa fa-search fa-fw"></i>搜索</a>
      </li>
    
  </ul>

</nav>
  <div class="site-search">
    <div class="popup search-popup">
    <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input" id="search-input"></div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="algolia-results">
  <div id="algolia-stats"></div>
  <div id="algolia-hits"></div>
  <div id="algolia-pagination" class="algolia-pagination"></div>
</div>

  
</div>
<div class="search-pop-overlay"></div>

  </div>
</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
            

          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
      <article itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block post">
    <link itemprop="mainEntityOfPage" href="http://anemone.top/container-Clair初探/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Anemone">
      <meta itemprop="description" content="关注Web安全、移动安全、Fuzz测试和机器学习">
      <meta itemprop="image" content="/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Anemone's Blog">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">Clair初探

          
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              
                
              

              <time title="创建时间：2019-11-16 16:12:49" itemprop="dateCreated datePublished" datetime="2019-11-16T16:12:49+08:00">2019-11-16</time>
            </span>
          
            

            
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2019-11-24 15:58:54" itemprop="dateModified" datetime="2019-11-24T15:58:54+08:00">2019-11-24</time>
              </span>
            
          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/container/" itemprop="url" rel="index"><span itemprop="name">container</span></a></span>

                
                
              
            </span>
          

          
            <span id="/container-Clair初探/" class="post-meta-item leancloud_visitors" data-flag-title="Clair初探" title="阅读次数">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span class="leancloud-visitors-count"></span>
            </span>
          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="Clair简介"><a href="#Clair简介" class="headerlink" title="Clair简介"></a>Clair简介</h1><p>clair是CoreOS公司开源的一套针对容器安全性检测工具，主要用于发掘容器中使用的组件是否存在安全性问题。</p><p>GitHub项目地址： <a href="https://github.com/quay/clair" target="_blank" rel="noopener">https://github.com/quay/clair</a> </p><h1 id="Clair-Framework"><a href="#Clair-Framework" class="headerlink" title="Clair Framework"></a>Clair Framework</h1><h2 id="术语"><a href="#术语" class="headerlink" title="术语"></a>术语</h2><ul>
<li>Ancestry——表示容器</li>
<li>Feature——容器中任何具有脆弱性的实体，如软件包和文件</li>
<li>Feature Namespace——Feature所在的上下文，如操作系统和编程语言</li>
<li>Vulnerability Source——Clair中用来跟踪上有漏洞数据库（如CVE）的组件</li>
<li>Vulnerability Metadata Source——漏洞元数据，用来关联上游漏洞数据和Clair数据库</li>
</ul><a id="more"></a>


<h2 id="Detector"><a href="#Detector" class="headerlink" title="Detector"></a>Detector</h2><ul>
<li>DataDector： 用来检测容器类型（除了docker还有appc）</li>
<li>FeaturesDector：发掘容器中使用的组件</li>
<li>NamespaceDetector：用来命名空间中存在的安全性问题</li>
</ul>
<h2 id="Updaters-amp-Notifiers"><a href="#Updaters-amp-Notifiers" class="headerlink" title="Updaters &amp; Notifiers"></a>Updaters &amp; Notifiers</h2><ul>
<li>updaters：用来从漏洞库里获取漏洞信息</li>
<li>Notifier：用来通知用户安全问题，同时支持webhook</li>
</ul>
<h2 id="Datastore"><a href="#Datastore" class="headerlink" title="Datastore"></a>Datastore</h2><p>主要用来存储漏洞数据</p>
<h1 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h1><h2 id="安装（Server）"><a href="#安装（Server）" class="headerlink" title="安装（Server）"></a>安装（Server）</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">mkdir clair_config</span><br><span class="line">curl -L https://raw.githubusercontent.com/coreos/clair/master/config.yaml.sample -o <span class="variable">$PWD</span>/clair_config/config.yaml</span><br><span class="line">docker run -d -e POSTGRES_PASSWORD=<span class="string">""</span> -p 5432:5432 postgres:9.6</span><br><span class="line">docker run --net=host -v <span class="variable">$PWD</span>/clair_config:/config quay.io/coreos/clair:latest -config=/config/config.yaml <span class="comment"># 选择稳定的版本</span></span><br></pre></td></tr></table></figure>
<p>验证：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">$ curl -X GET -I http://<span class="variable">$&#123;docker-host&#125;</span>:6061/health</span><br><span class="line">HTTP/1.1 200 OK</span><br><span class="line">Server: clair</span><br><span class="line">Date: Sat, 16 Nov 2019 12:39:46 GMT</span><br><span class="line">Content-Length: 0</span><br></pre></td></tr></table></figure>
<p>如果是第一次启动需要同步数据库，如果在国内需要等待更长时间，更新完毕后可以看到如下输出：</p>
<p><img src="/container-Clair初探/image-20191117195355945.png" alt="image-20191117195355945"></p>
<h2 id="使用"><a href="#使用" class="headerlink" title="使用"></a>使用</h2><p>刚刚启动的Clair只是一个API Server，具体API可以参考 <a href="https://app.swaggerhub.com/apis/coreos/clair/3.0" target="_blank" rel="noopener">https://app.swaggerhub.com/apis/coreos/clair/3.0</a> ，要使用它扫描<strong>本地容器</strong>可以使用<a href="https://github.com/coreos/analyze-local-images" target="_blank" rel="noopener">analyze-local-images</a>，然而Clair认为扫描本地容器不是值得提倡的实践，因此这个项目就被废弃掉了（其原理是本地启动一个dockerhub服务，但是由于docker版本问题如今已无法使用），但是类似的Client还有很多，在 <a href="https://github.com/quay/clair/blob/master/Documentation/integrations.md" target="_blank" rel="noopener">https://github.com/quay/clair/blob/master/Documentation/integrations.md</a> 上可以看到，比如<a href="https://github.com/yebinama/paclair" target="_blank" rel="noopener">paclair</a>，它允许我们将公有/私有docker仓库中的镜像上传到clair扫描，下面就以它为例，说明Clair使用方法。</p>
<p>安装paclair很简单：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pip install paclair</span><br></pre></td></tr></table></figure>
<p>接下来需要创建paclair配置（GitHub上还有其他仓库的配置）：</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">General:</span></span><br><span class="line">  <span class="attr">clair_url:</span> <span class="string">'http://docker.test:6060'</span></span><br><span class="line"><span class="attr">Plugins:</span></span><br><span class="line">  <span class="attr">Docker:</span></span><br><span class="line">    <span class="attr">class:</span> <span class="string">paclair.plugins.docker_plugin.DockerPlugin</span></span><br><span class="line">    <span class="attr">registries:</span></span><br><span class="line">      <span class="attr">hub.docker.com:</span></span><br><span class="line">        <span class="attr">auth:</span></span><br><span class="line">          <span class="bullet">-</span> <span class="string">"anemone95"</span></span><br><span class="line">          <span class="bullet">-</span> <span class="string">"***"</span></span><br></pre></td></tr></table></figure>
<p>假设配置文件保存为<code>paclair.yml</code>，接下来使用如下命令上传docker并启动扫描<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">paclair --debug --conf paclair.yml Docker registry.cn-hangzhou.aliyuncs.com/anemone/<span class="built_in">test</span> push <span class="comment"># 将dockerhub上的镜像上传到Clair</span></span><br><span class="line">paclair --conf paclair.yml Docker registry.cn-hangzhou.aliyuncs.com/anemone/<span class="built_in">test</span> analyse --output-format html 2&gt;result.html <span class="comment"># 扫描产生html的报告</span></span><br><span class="line">paclair --conf conf/conf.yml Docker registry.cn-hangzhou.aliyuncs.com/anemone/<span class="built_in">test</span> delete <span class="comment"># 删除容器</span></span><br></pre></td></tr></table></figure></p>
<p>产生的报告如下(test上的容器实际上是<code>medicean/vulapps:s_struts2_s2-037</code>：</p>
<p><img src="/container-Clair初探/image-20191117172303850.png" alt="image-20191117172303850"></p>
<p>struts2没找到漏洞，换个ssh(CVE-2017-1000117)看看，这回我们导出json格式的</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">paclair --debug --conf paclair.yml Docker medicean/vulapps:s_ssh_1 push</span><br><span class="line">paclair --conf paclair.yml Docker medicean/vulapps:s_ssh_1 analyse 2&gt;ssh.json</span><br></pre></td></tr></table></figure>
<p>这样就找到了：</p>
<p><img src="/container-Clair初探/image-20191124155822590.png" alt="image-20191124155822590"></p>
<h1 id="报告分析"><a href="#报告分析" class="headerlink" title="报告分析"></a>报告分析</h1><p>可以看到图片上，报告中展示了容器中使用的第三方组件，如gcc， unzip，openssl，并且给出了安全等级，当前版本和修复版本，但是也可以看到其不足：</p>
<ul>
<li>对应用组件的检测能力不足，如测试镜像的主要问题在于低版本struts，但是其没有检测到</li>
<li>只是简单对比其组件hash，而没有更深入的检测，如即使是使用了gcc，但是容器暴漏在外部的部分并没有用，那么实际上攻击者是无法利用的；又比如空密码的redis，使用hash比较是没法测出来的。</li>
</ul>
<h1 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h1><p>Clair是一款用来扫描容器中使用第三方不安全组件的工具，能够将容器分层扫描，匹配CVE，Ubuntu，Redhat等多个数据库，个人感觉有以下优缺点：</p>
<p>优点：</p>
<ul>
<li>开源核心模块，方便二次开发</li>
</ul>
<p>缺点：</p>
<ul>
<li>Client使用复杂，官方给出的client——analyze-local-images已经停止维护，更强大的client需要付费使用，而其他第三方的client不一定能持续维护</li>
<li>文档不全，GitHub主页的quickstart都有坑，而且更多配置没有说明</li>
<li>对应用组件的检测能力不足</li>
<li>检测逻辑简单，存在漏报和误报</li>
</ul>

    </div>

    
    
    
        
      
        

<div>
<ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者： </strong>Anemone</li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    <a href="http://anemone.top/container-Clair初探/" title="Clair初探">http://anemone.top/container-Clair初探/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" rel="noopener" target="_blank"><i class="fa fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！</li>
</ul>
</div>

      

      <footer class="post-footer">
          
            
          
          <div class="post-tags">
            
              <a href="/tags/容器安全/" rel="tag"># 容器安全</a>
            
              <a href="/tags/docker/" rel="tag"># docker</a>
            
          </div>
        

        

          <div class="post-nav">
            <div class="post-nav-next post-nav-item">
              
                <a href="/vulnresearch-Solr_Velocity_injection/" rel="next" title="Solr Velocity模板注入漏洞分析">
                  <i class="fa fa-chevron-left"></i> Solr Velocity模板注入漏洞分析
                </a>
              
            </div>

            <span class="post-nav-divider"></span>

            <div class="post-nav-prev post-nav-item">
              
                <a href="/vulnresearch-Shrio1.4.0PaddingOracle导致反序列化/" rel="prev" title="Shiro v1.4.0反序列化">
                  Shiro v1.4.0反序列化 <i class="fa fa-chevron-right"></i>
                </a>
              
            </div>
          </div>
        
      </footer>
    
  </div>
  
  
  
  </article>

  </div>


          </div>
          
    
    <div class="comments" id="gitalk-container"></div>
  

        </div>
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">
        
        
        
        
      

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#Clair简介"><span class="nav-number">1.</span> <span class="nav-text">Clair简介</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Clair-Framework"><span class="nav-number">2.</span> <span class="nav-text">Clair Framework</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#术语"><span class="nav-number">2.1.</span> <span class="nav-text">术语</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Detector"><span class="nav-number">2.2.</span> <span class="nav-text">Detector</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Updaters-amp-Notifiers"><span class="nav-number">2.3.</span> <span class="nav-text">Updaters &amp; Notifiers</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Datastore"><span class="nav-number">2.4.</span> <span class="nav-text">Datastore</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Quick-Start"><span class="nav-number">3.</span> <span class="nav-text">Quick Start</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#安装（Server）"><span class="nav-number">3.1.</span> <span class="nav-text">安装（Server）</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#使用"><span class="nav-number">3.2.</span> <span class="nav-text">使用</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#报告分析"><span class="nav-number">4.</span> <span class="nav-text">报告分析</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#总结"><span class="nav-number">5.</span> <span class="nav-text">总结</span></a></li></ol></div>
        
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image"
      src="/images/avatar.jpg"
      alt="Anemone">
  <p class="site-author-name" itemprop="name">Anemone</p>
  <div class="site-description" itemprop="description">关注Web安全、移动安全、Fuzz测试和机器学习</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        
          <a href="/archives/">
        
          <span class="site-state-item-count">70</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
    
      
      
      <div class="site-state-item site-state-categories">
        
          
            <a href="/categories/">
          
        
        <span class="site-state-item-count">31</span>
        <span class="site-state-item-name">分类</span>
        </a>
      </div>
    
      
      
      <div class="site-state-item site-state-tags">
        
          
            <a href="/tags/">
          
        
        <span class="site-state-item-count">86</span>
        <span class="site-state-item-name">标签</span>
        </a>
      </div>
    
  </nav>
</div>
  <div class="feed-link motion-element">
    <a href="/atom.xml" rel="alternate">
      <i class="fa fa-rss"></i>RSS
    </a>
  </div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
      
      
        
      
      
        
      
        <a href="https://github.com/anemone95" title="GitHub &rarr; https://github.com/anemone95" rel="noopener" target="_blank"><i class="fa fa-fw fa-github"></i>GitHub</a>
      </span>
    
      <span class="links-of-author-item">
      
      
        
      
      
        
      
        <a href="mailto:anemone95@qq.com" title="E-Mail &rarr; mailto:anemone95@qq.com" rel="noopener" target="_blank"><i class="fa fa-fw fa-envelope"></i>E-Mail</a>
      </span>
    
  </div>
  <div class="cc-license motion-element" itemprop="license">
    
  
    <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" class="cc-opacity" rel="noopener" target="_blank"><img src="/images/cc-by-nc-sa.svg" alt="Creative Commons"></a>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2018 – <span itemprop="copyrightYear">2020</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">anemone</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io" class="theme-link" rel="noopener" target="_blank">Hexo</a> 强力驱动 v3.9.0</div>
  <span class="post-meta-divider">|</span>
  <div class="theme-info">主题 – <a href="https://theme-next.org" class="theme-link" rel="noopener" target="_blank">NexT.Pisces</a> v7.4.0</div>

        






  
  <script>
  function leancloudSelector(url) {
    return document.getElementById(url).querySelector('.leancloud-visitors-count');
  }
  if (CONFIG.page.isPost) {
    function addCount(Counter) {
      var visitors = document.querySelector('.leancloud_visitors');
      var url = visitors.getAttribute('id').trim();
      var title = visitors.getAttribute('data-flag-title').trim();

      Counter('get', `/classes/Counter?where=${JSON.stringify({ url })}`)
        .then(response => response.json())
        .then(({ results }) => {
          if (results.length > 0) {
            var counter = results[0];
            Counter('put', '/classes/Counter/' + counter.objectId, { time: { '__op': 'Increment', 'amount': 1 } })
              .then(response => response.json())
              .then(() => {
                leancloudSelector(url).innerText = counter.time + 1;
              })
            
              .catch(error => {
                console.log('Failed to save visitor count', error);
              })
          } else {
              Counter('post', '/classes/Counter', { title: title, url: url, time: 1 })
                .then(response => response.json())
                .then(() => {
                  leancloudSelector(url).innerText = 1;
                })
                .catch(error => {
                  console.log('Failed to create', error);
                });
            
          }
        })
        .catch(error => {
          console.log('LeanCloud Counter Error', error);
        });
    }
  } else {
    function showTime(Counter) {
      var visitors = document.querySelectorAll('.leancloud_visitors');
      var entries = [...visitors].map(element => {
        return element.getAttribute('id').trim();
      });

      Counter('get', `/classes/Counter?where=${JSON.stringify({ url: { '$in': entries } })}`)
        .then(response => response.json())
        .then(({ results }) => {
          if (results.length === 0) {
            document.querySelectorAll('.leancloud_visitors .leancloud-visitors-count').forEach(element => {
              element.innerText = 0;
            });
            return;
          }
          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.url;
            var time = item.time;
            leancloudSelector(url).innerText = time;
          }
          for (var i = 0; i < entries.length; i++) {
            var url = entries[i];
            var element = leancloudSelector(url);
            if (element.innerText == '') {
              element.innerText = 0;
            }
          }
        })
        .catch(error => {
          console.log('LeanCloud Counter Error', error);
        });
    }
  }

  fetch('https://app-router.leancloud.cn/2/route?appId=o5UaCJdPfEG0g7MVxXSMagpT-gzGzoHsz')
    .then(response => response.json())
    .then(({ api_server }) => {
      var Counter = (method, url, data) => {
        return fetch(`https://${api_server}/1.1${url}`, {
          method: method,
          headers: {
            'X-LC-Id': 'o5UaCJdPfEG0g7MVxXSMagpT-gzGzoHsz',
            'X-LC-Key': 'c6IN1PuMV3QPltJcrHfn74Gt',
            'Content-Type': 'application/json',
          },
          body: JSON.stringify(data)
        });
      };
      if (CONFIG.page.isPost) {
        const localhost = /http:\/\/(localhost|127.0.0.1|0.0.0.0)/;
        if (localhost.test(document.URL)) return;
        addCount(Counter);
      } else if (document.querySelectorAll('.post-title-link').length >= 1) {
        showTime(Counter);
      }
    });
  </script>






        
      </div>
    </footer>
  </div>

  
  <script src="//cdn.jsdelivr.net/npm/animejs@3.1.0/lib/anime.min.js"></script>
  <script src="https://cdn.bootcss.com/velocity/1.2.1/velocity.min.js"></script>
  <script src="https://cdn.bootcss.com/velocity/1.2.1/velocity.ui.js"></script>
<script src="/js/utils.js?v=7.4.0"></script><script src="/js/motion.js?v=7.4.0"></script>
<script src="/js/schemes/pisces.js?v=7.4.0"></script>
<script src="/js/next-boot.js?v=7.4.0"></script>



  
  <script>
    (function(){
      var bp = document.createElement('script');
      var curProtocol = window.location.protocol.split(':')[0];
      bp.src = (curProtocol === 'https') ? 'https://zz.bdstatic.com/linksubmit/push.js' : 'http://push.zhanzhang.baidu.com/push.js';
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(bp, s);
    })();
  </script>








  
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/instantsearch.js@2.10.4/dist/instantsearch.min.css">
<script src="//cdn.jsdelivr.net/npm/instantsearch.js@2.10.4/dist/instantsearch.min.js"></script><script src="/js/algolia-search.js?v=7.4.0"></script>











<script>
if (document.querySelectorAll('pre.mermaid').length) {
  NexT.utils.getScript('//cdn.bootcss.com/mermaid/8.2.6/mermaid.min.js', () => {
    mermaid.initialize({
      theme: 'forest',
      logLevel: 3,
      flowchart: { curve: 'linear' },
      gantt: { axisFormat: '%m/%d/%Y' },
      sequence: { actorMargin: 50 }
    });
  }, window.mermaid);
}
</script>




  

  

  

  

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.css">

<script>
  NexT.utils.getScript('//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js', () => {
    var gitalk = new Gitalk({
      clientID: 'f3075553d7b0225df6ca',
      clientSecret: '68362ba87c4cc8e13103afcf729f5bd8ea176a78',
      repo: 'anemone95.github.io',
      owner: 'Anemone95',
      admin: ['Anemone95'],
      id: '5eed78581e86d0221a759d7d91eb8b7b',
        language: window.navigator.language || window.navigator.userLanguage,
      
      distractionFreeMode: 'true'
    });
    gitalk.render('gitalk-container');
  }, window.Gitalk);
</script>

</body>
</html>
